package com.share.device.repository;

import com.share.device.domain.StationLocation;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * 实现mongodb操作两种方式，一种是这种，继承这个类，然后进行getxxx，deletexxx方法编写，另一种是直接注入private MongoTemplate mongoTemplate;
 */
@Repository
public interface StationLocationRepository extends MongoRepository<StationLocation, String> {

    //方法不需要进行实现，只需要以getxxxId命名即可
    StationLocation getByStationId(Long stationId);

    void deleteByStationId(Long stationId);
}
